package com.wecan.base.PO;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.wecan.base.enums.MessageContentType;
import com.wecan.base.enums.MessageStatus;
import com.wecan.base.enums.MessageType;
import lombok.Data;

/**
 * @Author liuzhihao
 * @Date 2022.03.26
 * @Version ${version}
 * @Description 消息表
 */
@Data
public class Message {
    @JsonSerialize(using = ToStringSerializer.class)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long userId;

    @JsonSerialize(using = ToStringSerializer.class)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long toUserId;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private MessageType type;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private MessageContentType contentType;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String content;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long createDate;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private MessageStatus status;

}
